<!-- target: order -->
<div class="order-detail-page detail-page flex-cont" ui="type:m-panel;">
    <div class="detail-info staff-info">
        <!-- if: ${detail.headPortrait} -->
        <img src="={${detial.headPortrait}" alt="">
        <!-- elif: ${detail} -->
        <!-- var: name = String.prototype.slice.call(${detail.creatorName}, -2) -->
        <div class="head">${name}</div>
        <!-- /if -->
        <div class="text">
            <div class="name">${detail.creatorName}</div>
            <div class="status">${detail.auditStateDesc}</div>
        </div>
        <img class="audit-state" src="images/approval/auditState_${detail.auditState}.png" />
    </div>
    <ul class="detail-info info-list">
        <li class="info-item">
            <div class="info-label">订单编号：</div>
            <div class="info-text">[${detail.orderSn}]</div>
        </li>
        <li class="info-item">
            <div class="info-label">所在部门：</div>
            <div class="info-text">[${detail.deptName}]</div>
        </li>
        <li class="info-item">
            <div class="info-label">订场名称：</div>
            <div class="info-text">[${detail.reserveName}]</div>
        </li>
        <li class="info-item">
            <div class="info-label">预订场馆：</div>
            <div class="info-text">[${detail.venueName}]</div>
        </li>
        <li class="info-item">
            <div class="info-label">场次：</div>
            <div class="info-text">[${detail.actionCuttingName}]</div>
        </li>
        <li class="info-item">
            <div class="info-label">开演时间：</div>
            <div class="info-text">[${detail.startTime|dateFormat('yyyy-MM-dd HH:mm:ss')}]</div>
        </li>
        <li class="info-item">
            <div class="info-label">结束时间：</div>
            <div class="info-text">[${detail.endTime|dateFormat('yyyy-MM-dd HH:mm:ss')}]</div>
        </li>
        <li class="info-item">
            <div class="info-label">音乐人：</div>
            <div class="info-text">[${detail.musiciansName}]</div>
        </li>
        <!-- <li class="info-item">
            <div class="info-label">图片：</div>
            <div class="info-text"><img src="" /></div>
        </li> -->
    </ul>

    <!-- use:detail.contactInfo(detail=${detail}) -->

    <!-- if: ${moduleType} === '2' -->
    <!-- use:detail.contractInfo(detail=${detail}) -->
    <!-- /if -->

    <!-- use:detail.histories(histories=${detail.histories}) -->

</div>
<!-- use:detail.comment(detail=${detail},module=1,initiate=${initiate}) -->


<!-- target:contractInfo -->
<div class="detail-info info-title">合同信息</div>

<ul class="detail-info info-list">
    <li class="info-item">
        <div class="info-label">主办方：</div>
        <div class="info-text">[${detail.contractInfo.sourceOrderSn}]</div>
    </li>
</ul>

<!-- target:contactInfo -->
<div class="detail-info info-title">客户信息</div>

<ul class="detail-info info-list">
    <li class="info-item">
        <div class="info-label">主办方：</div>
        <div class="info-text">[${detail.sponsorName}]</div>
    </li>
    <li class="info-item">
        <div class="info-label">联系人：</div>
        <div class="info-text">[${detail.contact}]</div>
    </li>
    <li class="info-item">
        <div class="info-label">联系电话：</div>
        <div class="info-text">[${detail.tel}]</div>
    </li>
</ul>

<!-- target:business -->
<div class="detail-info info-title">商务条款</div>

<ul class="detail-info info-list">
    <!-- if: ${detail.contractAmount} -->
    <li class="info-item">
        <div class="info-label">合同金额：</div>
        <div class="info-text">[${detail.contractAmount} + ={${detail.integralBalance} === 1 ? '积分不抵现' : '积分抵现' }]</div>
    </li>
    <!-- /if -->
    <!-- if: ${detail.ticketDivisionMethod.divisionMethod} -->
    <li class="info-item">
        <div class="info-label">分成方式：</div>
        <div class="info-text">[${detail.ticketDivisionMethod.divisionMethod|parseBaseInfo('divisionMethod')}]</div>
    </li>
    <!-- /if -->
    <li class="info-item">
        <div class="info-label">保底金额：</div>
        <div class="info-text">[${detail.foundationDeposit}]</div>
    </li>
    <li class="info-item">
        <div class="info-label">预付款：</div>
        <div class="info-text">[${detail.advanceCharge}]</div>
    </li>
</ul>
<!-- if: ${detail.ticketDivisionMethod.proportions.length} -->
<ul class="detail-info info-list table">
    <li class="info-item table-item title">
        <div>分成条件</div>
        <div>触发阈值</div>
        <div>我方占比</div>
        <div>他方占比</div>
    </li>
    <!-- for:${detail.ticketDivisionMethod.proportions} as ${item} -->
    <li class="info-item table-item">
        <div>${item.condition|parseDefault('--')}</div>
        <div>${item.threshold|parseDefault('--')}</div>
        <div>${item.weProportion}</div>
        <div>${item.otherProportion}</div>
    </li>
    <!-- /for -->
</ul>
<!-- /if -->

<!-- target:drink -->
<div class="detail-info info-title">酒水分成</div>

<ul class="detail-info info-list">
    <li class="info-item">
        <div class="info-label">分成类型：</div>
        <div class="info-text">[${detail.drinksDivisionMethod.divisionTypeDesc}]</div>
    </li>
    <li class="info-item">
        <div class="info-label">分成方式：</div>
        <div class="info-text">[${detail.drinksDivisionMethod.divisionMethodDesc}]</div>
    </li>
</ul>
<!-- if: ${detail.drinksDivisionMethod.proportions.length} -->
<ul class="detail-info info-list table">
    <li class="info-item table-item title">
        <div>分成条件</div>
        <div>触发阈值</div>
        <div>我方占比</div>
        <div>他方占比</div>
    </li>
    <!-- for:${detail.drinksDivisionMethod.proportions} as ${item} -->
    <li class="info-item table-item">
        <div>${item.condition|parseDefault('--')}</div>
        <div>${item.threshold|parseDefault('--')}</div>
        <div>${item.weProportion}</div>
        <div>${item.otherProportion}</div>
    </li>
    <!-- /for -->
</ul>
<!-- /if -->

<!-- target:other -->
<!-- if:${detail.incomeExtList.length} -->
<div class="detail-info info-title">其它收入</div>

<ul class="detail-info info-list table">
    <li class="info-item table-item title">
        <div>收入项</div>
        <div>收入金额</div>
    </li>
    <!-- for:${detail.incomeExtList} as ${item} -->
    <li class="info-item table-item">
        <div>${item.incomeName}</div>
        <div>${item.incomeMoney}</div>
    </li>
    <!-- /for -->
</ul>
<!-- /if -->

<!-- target:ticket -->
<!-- if:${detail.ticketExts.length} -->
<div class="detail-info info-title">票务信息</div>

<!-- for:${detail.ticketExts} as ${item} -->
<ul class="detail-info info-list ticket">
    <li class="info-item ticket-info">
        <div class="num">${item.price}</div>
        <div class="date-time">开票时间<span class="time">${item.saleStartTime|dateFormat('MM.dd HH:mm')} - ${item.saleEndTime|dateFormat('MM.dd HH:mm')}</span></div>
        <div class="type">${item.ticketType|parseBaseInfo('ticketType')}</div>
    </li>
    <li class="info-item info-desc">
        <div>={${item.includeOtherCosts} === 2 ? '含' : '不含'}其他费用 ${item.price}/张 </div>
        <div>库存 ${item.inventory} 张 限购 ${item.limitation}/人</div>
    </li>
</ul>
<!-- /for -->
<!-- /if -->

<!-- target:histories -->
<div class="detail-info info-title">系统信息</div>

<ul class="detail-info info-node">
    <!-- for: ${histories} as ${item} -->
    <li class="node-item">
        <!-- var: staffName = ${item.staffName} ? ${item.staffName} : ${item.creatorName} -->
        <!-- var: operationDesc = ${item.operationDesc} ? ${item.operationDesc} : ${item.operation} -->
        <!-- if: ${item.headPortrait} -->
        <img src="={${item.headPortrait}" alt="">
        <!-- else -->
        <!-- var: name = String.prototype.slice.call(${staffName}, -2) -->
        <div class="head">${name}</div>
        <!-- /if -->
        <div class="text">
            <span class="name">${staffName}</span>
            <span class="operate">${operationDesc}</span>
            <span class="time">${item.ctime|dateFormat('MM-dd HH:mm')}</span>
            <div class="remark">${item.remark}</div>
        </div>
    </li>
    <!-- /for -->
</ul>

<!-- target:comment -->
<!-- var:auditState = ${detail.auditState} !== undefined ? ${detail.auditState} : ${detail.contractInfo.auditState}; -->
<form class="operate-btn-box" name="commentForm">
    <input class="ui-hide" name="id" value="${detail.id}" />
    <input class="ui-hide" name="action" value="" />
    <label ui="type:NS.OrderCommentSave;">
        <input class="text" type="text" placeholder="请输入" name="actionRemark" />
        <input class="submit-btn" type="button" disabled value="提交"/>
        <div class="btn-items">

            <!-- if: ${auditState} === 1 -->
                <!-- if: ${mao.staffInfo.storeManager} || ${mao.staffInfo.staffId} === ${detail.creatorId} -->
                <strong class="btn-item" ui="ext-permission:={mao.joinPermission(${module}, 'modify')};module:${module};action:0"><span class="icon more"></span><span>撤销</span></strong>
                <!-- /if -->
                <!-- if: ${detail.auditNode} === 1 -->
                <strong class="btn-item" ui="ext-permission:={mao.joinPermission(${module}, (${detail.type} === 1 ? 'auditFinal' : 'auditFirst'))};module:${module};action:3"><span class="icon more"></span><span>通过</span></strong>
                <strong class="btn-item" ui="ext-permission:={mao.joinPermission(${module}, (${detail.type} === 1 ? 'auditFinal' : 'auditFirst'))};module:${module};action:2"><span class="icon more"></span><span>驳回</span></strong>
                <!-- elif: ${detail.auditNode} === 2 -->
                <strong class="btn-item" ui="ext-permission:={mao.joinPermission(${module}, 'auditFinal')};module:${module};action:3"><span class="icon more"></span><span>通过</span></strong>
                <strong class="btn-item" ui="ext-permission:={mao.joinPermission(${module}, 'auditFinal')};module:${module};action:2"><span class="icon more"></span><span>驳回</span></strong>
                <!-- /if -->

            <!-- elif: ${auditState} === 0 || ${auditState} === 2 -->
                <!-- if: ${mao.staffInfo.storeManager} || ${mao.staffInfo.staffId} === ${detail.creatorId} -->
                <a class="btn-item" href="#/venueOrder/edit~id=${detail.id}" ui="ext-permission:={mao.joinPermission(${module}, 'modify')};module:${module};action:5"><span class="icon more"></span><span>编辑</span></a>
                <strong class="btn-item" ui="ext-permission:={mao.joinPermission(${module}, 'modify')};module:${module};action:6"><span class="icon more"></span><span>删除</span></strong>
                <!-- /if -->
            <!-- elif: ${auditState} === 3 -->
            <strong class="btn-item" ui="ext-permission:={mao.joinPermission(${module}, 'auditFinal')};module:${module};action:4"><span class="icon more"></span><span>终止</span></strong>
            <!-- /if -->

            <strong class="btn-item" ui="module:${module};action:7"><span class="icon"></span><span>评论</span></strong>
        </div>
    </label>
</form>

